package com.fesine.ch01.lesson07.stopThrowLock;

/**
 * 使用stop释放锁造成数据不一致性的结果
 * @author: Fesine
 * @CreateDate:2016/6/27
 * @UpdateUser:修改人名称
 * @UpdateDate:2016/6/27
 * @UpdateRemark:修改具体的内容
 */
public class Run {
    public static void main(String[] args) {
        try {
            SynchronizedObject object = new SynchronizedObject();
            MyThread thread = new MyThread(object);
            thread.start();
            Thread.sleep(500);
            thread.stop();
            System.out.println(object.getUsername()+" " + object.getPassword());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
